package pile.pay.service.impl;

import pile.pay.entity.RefundOrder;
import pile.pay.mapper.RefundOrderMapper;
import pile.pay.service.IRefundOrderService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import pile.pay.entity.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import pile.pay.utils.WebUtils;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import pile.pay.entity.PageList;
import org.apache.commons.lang.StringUtils;
import java.util.Arrays;
import pile.pay.params.refundOrder.DeleDTO;
import pile.pay.params.refundOrder.ListDTO;
/**
 * <p>
 * 退款信息表 服务实现类
 * </p>
 *
 * @author 郭天义
 * @since 2024-07-01
 */
@Service
public class RefundOrderServiceImpl extends ServiceImpl<RefundOrderMapper, RefundOrder> implements IRefundOrderService {

    @Autowired
    private RefundOrderMapper refundOrderMapper;

   @Override
   public ResponseResult edit(RefundOrder refundOrder) {
        refundOrderMapper.updateById(refundOrder);
        return new ResponseResult(200,"更新成功");
   }

    /**
     * 根据第三方未微信支付订单号查询
     * @param transactionId
     * @return
     */
    @Override
    public RefundOrder selectByTransactionId(String transactionId) {
        return  refundOrderMapper.selectByTransactionId(transactionId);
    }

    @Override
    public void add(RefundOrder refundOrder) {
        refundOrderMapper.insert(refundOrder);
    }
}
